package com.ymatou.better.service;
import org.json.JSONException;
import org.json.JSONObject;

import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;
/**
*FreeMaker Template自动生成代码
*/
public class FindApplicationEnvByAppAndEnvCall extends YmatouBaseCall{
	private static String opurl ="home/findApplicationEnvByAppAndEnv.action";
	
	public FindApplicationEnvByAppAndEnvCall() {
		super("http://better.ymatou.com/", opurl,"POST","PARAM");
	}
//	@Override
//	public void addDefHeader() {
//		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
//		client.addHeader("Content-Type", "application/json; charset=UTF-8");
//	}

	public String getIp(){
		return getJsonObject().get("appenv").getAsJsonObject().get("vminfo").getAsJsonObject().get("ip").getAsString().trim();
	}
	
}
